/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aybolit.core.objects.dao.impl;

import aybolit.core.objects.dao.AnalyzysNameDao;
import aybolit.core.objects.model.AnalyzesName;
import java.io.Serializable;
import java.util.List;
import javax.annotation.Resource;
import org.hibernate.SessionFactory;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Masumov Emin
 */
@Transactional
public class AnalyzesNameDaoImp implements AnalyzysNameDao, Serializable {

    SessionFactory sessionFactory;

    @Transactional
    @Override
    public List<AnalyzesName> findAllAnalyzesName() {
       return sessionFactory.getCurrentSession().getNamedQuery("AnalyzesName.findAllAnalyzesName").list();     
    }

    @Resource(name = "sessionFactory")
    public void setSessionFactory(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }
}
